package com.lantosec.hmrp.modules.supplier.vo;

import java.math.BigDecimal;

import com.lantosec.hmrp.modules.supplier.entity.SupplierContractDetail;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 供应商合同明细 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierContractDetail对象", description="供应商合同明细")
public class SupplierContractDetailVO extends BaseVO<SupplierContractDetail> {
    private static final long serialVersionUID = 1L;


    public SupplierContractDetailVO(SupplierContractDetail entity){
        this.contractDetailId = entity.getContractDetailId();
        this.contractId = entity.getContractId();
        this.detailName = entity.getDetailName();
        this.specifications = entity.getSpecifications();
        this.unit = entity.getUnit();
        this.number = entity.getNumber();
        this.price = entity.getPrice();
        this.amount = entity.getAmount();
    }

    @Override
    public SupplierContractDetail convertToEntity(){
        return new SupplierContractDetail(this);
    }


    @ApiModelProperty(value = "合同明细ID")
    private Integer contractDetailId;

    @ApiModelProperty(value = "合同ID")
    private String contractId;

    @ApiModelProperty(value = "明细名称")
    private String detailName;

    @ApiModelProperty(value = "规格")
    private String specifications;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "数量")
    private BigDecimal number;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;


}
